<?php 
namespace Models;
/**
 * 订单商品
 * @package Models
 * @author 江羿平<hugcolin@163.com>
 */
class Order_item extends Model{

	protected $_table = 'order_items';

	protected $_filter = FALSE;

	protected $_primekey = 'id';

	protected $_belongs = [
		'product' => [
			'class' => Product::Class,
			'foreign' => 'id',
			'belongs_key' => 'product_id'
		],
		'item' => [
			'class' => Item::Class,
			'foreign' => 'id',
			'belongs_key' => 'item_id'
		],
		'order' => [
			'class' => Order::Class,
			'foreign' => 'id',
			'belongs_key' => 'order_id'
		]
	];
}
?>